import { defineStore } from "pinia";
import { getEqIDs } from '@/api/screen/equipment';
import emits from '@/utils/emits';
import { throttle, debounce } from "lodash-es";
export const useIds = defineStore('useids', () => {

    const storeGetIDs = async () => {
        //根据位置主键获取设备主键集合
        // let res: any = await getEqIDs('ALL');
        // localStorage.setItem('ids', JSON.stringify(res.data.join()));
    };

    const getsessionStorage = () => {
        // return JSON.parse(localStorage.getItem('ids'))
    }
    const resetIDs = async (code: any) => {
        // let res: any = await getEqIDs(code)
        // localStorage.setItem('ids', JSON.stringify(res.data.join()));
        // emits.emit('changeLocation')
        // emits.emit('changeTab')

    }
    return {
        storeGetIDs,
        getsessionStorage,
        resetIDs
    }
})  